<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var func = function () {
            var a = 10

            var b = 20

            console.log('执行函数')
            console.log(a + b)
        }

        func()

        function func2(c,d) {
            console.log('执行函数2')
            console.log(c)
            console.log(d)
        }

        func2(100,200)

        var func3 = new Function('arg1','arg2',"return arg1*arg2")

        var funcresult = func3(1,2)

        console.log(funcresult)
    </script>
</body>

</html>